package com.google.code.nexttraffic.web.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.google.code.nexttraffic.web.model.base.BaseObject;


/**
 * @author ParkHaeCheol
 * 
 */
public class Passterminal extends BaseObject {

	private static final long serialVersionUID = 1L;

	private Integer passId;
	
	private Integer timeTableId;
	
	private String passedName;
	
	private String passFare;
	
	private String passDistance;
	
	private String pTimeRequired;
	
	
	public Passterminal(){}
	
	public Passterminal(Integer passId, Integer timeTableId, String passedName,
			String passFare, String passDistance, String pTimeRequired) {
		super();
		this.passId = passId;
		this.timeTableId = timeTableId;
		this.passedName = passedName;
		this.passFare = passFare;
		this.passDistance = passDistance;
		this.pTimeRequired = pTimeRequired;
	}

	@Override
	public boolean equals(Object o) {

		if (o instanceof Passterminal == false) {
			return false;
		}

		if (this == o) {
			return true;
		}

		Passterminal rhs = (Passterminal) o;

		EqualsBuilder equb = new EqualsBuilder();
		equb.append(passId, rhs.getPassId());
		equb.append(timeTableId, rhs.getTimeTableId());

		return equb.isEquals();
	}

	@Override
	public int hashCode() {

		HashCodeBuilder hashcode = new HashCodeBuilder(3, 37);
		hashcode.append(passId);
		hashcode.append(timeTableId);

		return hashcode.toHashCode();
	}

	@Override
	public String toString() {

		ToStringBuilder tob = new ToStringBuilder(this,
				ToStringStyle.MULTI_LINE_STYLE);

		tob.append("passId", passId);
		tob.append("timeTableId", timeTableId);
		tob.append("passedName", passedName);
		tob.append("passFare", passFare);
		tob.append("passDistance", passDistance);
		tob.append("pTimeRequired", pTimeRequired);

		return tob.toString();

	}

	public Integer getPassId() {
		return passId;
	}

	public void setPassId(Integer passId) {
		this.passId = passId;
	}

	public Integer getTimeTableId() {
		return timeTableId;
	}

	public void setTimeTableId(Integer timeTableId) {
		this.timeTableId = timeTableId;
	}

	public String getPassedName() {
		return passedName;
	}

	public void setPassedName(String passedName) {
		this.passedName = passedName;
	}

	public String getPassFare() {
		return passFare;
	}

	public void setPassFare(String passFare) {
		this.passFare = passFare;
	}

	public String getPassDistance() {
		return passDistance;
	}

	public void setPassDistance(String passDistance) {
		this.passDistance = passDistance;
	}

	public String getPTimeRequired() {
		return pTimeRequired;
	}

	public void setPTimeRequired(String timeRequired) {
		pTimeRequired = timeRequired;
	}



}
